function factorial(num, b=2) {
  return num == 1 ? 1 : num * factorial(num - 1);
}

let proxy = new Proxy(factorial, {
	apply: function(target, thisArg, argumentsList) {
		console.log('apply..')
	return '32323'
	},

})

console.log(proxy)
console.log(typeof proxy, proxy.constructor)

console.dir(proxy)
console.log(proxy.apply(factorial, [3]))
console.log(proxy.call(factorial, 5))
console.log(proxy.name, proxy.arguments)
console.log(proxy.length, factorial.length)

console.log('-----------------------\n')

/*
function sum(a, b =1) {
	return a + b
}

console.dir(sum)
console.log(sum.length)
*/
